package entity;
// default package

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Usedhouse entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "usedhouse", catalog = "house")
public class Usedhouse implements java.io.Serializable {

	// Fields

	private Integer id;
	private Consumer consumer;
	private Housetypes housetypes;
	private Infotypes infotypes;
	private Area area;
	private String uhPathname;
	private String uhAddress;
	private String uhType;
	private String uhArea;
	private String uhPrice;
	private String uhFitment;
	private String uhFloor;
	private String uhCarbarn;
	private String uhAttribute;
	private Date uhYear;
	private String uhGlebeCharacter;
	private String uhCountFloor;
	private String uhFacility;
	private String uhContent;
	private Date uhIssueTime;
	private Date uhRenewalTime;
	private Date uhAvailabilityTime;
	private Integer uhReading;

	private Set<Leaveword> leavewords = new HashSet<Leaveword>(0);

	// Constructors

	/** default constructor */
	public Usedhouse() {
	}

	/** minimal constructor */
	public Usedhouse(Consumer consumer, Housetypes housetypes,
			Infotypes infotypes, Area area, String uhPathname, String uhArea,
			String uhPrice, String uhFitment, String uhFloor, String uhCarbarn,
			String uhAttribute, String uhCountFloor, Date uhIssueTime,
			Date uhRenewalTime, Integer uhReading
) {
		this.consumer = consumer;
		this.housetypes = housetypes;
		this.infotypes = infotypes;
		this.area = area;
		this.uhPathname = uhPathname;
		this.uhArea = uhArea;
		this.uhPrice = uhPrice;
		this.uhFitment = uhFitment;
		this.uhFloor = uhFloor;
		this.uhCarbarn = uhCarbarn;
		this.uhAttribute = uhAttribute;
		this.uhCountFloor = uhCountFloor;
		this.uhIssueTime = uhIssueTime;
		this.uhRenewalTime = uhRenewalTime;
		this.uhReading = uhReading;
	
	}

	/** full constructor */
	public Usedhouse(Consumer consumer, Housetypes housetypes,
			Infotypes infotypes, Area area, String uhPathname,
			String uhAddress, String uhType, String uhArea, String uhPrice,
			String uhFitment, String uhFloor, String uhCarbarn,
			String uhAttribute, Date uhYear, String uhGlebeCharacter,
			String uhCountFloor, String uhFacility, String uhContent,
			Date uhIssueTime, Date uhRenewalTime, Date uhAvailabilityTime,
			Integer uhReading,
			Set<Leaveword> leavewords) {
		this.consumer = consumer;
		this.housetypes = housetypes;
		this.infotypes = infotypes;
		this.area = area;
		this.uhPathname = uhPathname;
		this.uhAddress = uhAddress;
		this.uhType = uhType;
		this.uhArea = uhArea;
		this.uhPrice = uhPrice;
		this.uhFitment = uhFitment;
		this.uhFloor = uhFloor;
		this.uhCarbarn = uhCarbarn;
		this.uhAttribute = uhAttribute;
		this.uhYear = uhYear;
		this.uhGlebeCharacter = uhGlebeCharacter;
		this.uhCountFloor = uhCountFloor;
		this.uhFacility = uhFacility;
		this.uhContent = uhContent;
		this.uhIssueTime = uhIssueTime;
		this.uhRenewalTime = uhRenewalTime;
		this.uhAvailabilityTime = uhAvailabilityTime;
		this.uhReading = uhReading;
	
		this.leavewords = leavewords;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "consumerid", nullable = false)
	public Consumer getConsumer() {
		return this.consumer;
	}

	public void setConsumer(Consumer consumer) {
		this.consumer = consumer;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "housetypesid", nullable = false)
	public Housetypes getHousetypes() {
		return this.housetypes;
	}

	public void setHousetypes(Housetypes housetypes) {
		this.housetypes = housetypes;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "infotypesid", nullable = false)
	public Infotypes getInfotypes() {
		return this.infotypes;
	}

	public void setInfotypes(Infotypes infotypes) {
		this.infotypes = infotypes;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "areaid", nullable = false)
	public Area getArea() {
		return this.area;
	}

	public void setArea(Area area) {
		this.area = area;
	}

	@Column(name = "uh_pathname", nullable = false, length = 50)
	public String getUhPathname() {
		return this.uhPathname;
	}

	public void setUhPathname(String uhPathname) {
		this.uhPathname = uhPathname;
	}

	@Column(name = "uh_address", length = 100)
	public String getUhAddress() {
		return this.uhAddress;
	}

	public void setUhAddress(String uhAddress) {
		this.uhAddress = uhAddress;
	}

	@Column(name = "uh_type", length = 20)
	public String getUhType() {
		return this.uhType;
	}

	public void setUhType(String uhType) {
		this.uhType = uhType;
	}

	@Column(name = "uh_area", nullable = false, length = 20)
	public String getUhArea() {
		return this.uhArea;
	}

	public void setUhArea(String uhArea) {
		this.uhArea = uhArea;
	}

	@Column(name = "uh_price", nullable = false, length = 20)
	public String getUhPrice() {
		return this.uhPrice;
	}

	public void setUhPrice(String uhPrice) {
		this.uhPrice = uhPrice;
	}

	@Column(name = "uh_fitment", nullable = false, length = 100)
	public String getUhFitment() {
		return this.uhFitment;
	}

	public void setUhFitment(String uhFitment) {
		this.uhFitment = uhFitment;
	}

	@Column(name = "uh_floor", nullable = false, length = 10)
	public String getUhFloor() {
		return this.uhFloor;
	}

	public void setUhFloor(String uhFloor) {
		this.uhFloor = uhFloor;
	}

	@Column(name = "uh_carbarn", nullable = false, length = 50)
	public String getUhCarbarn() {
		return this.uhCarbarn;
	}

	public void setUhCarbarn(String uhCarbarn) {
		this.uhCarbarn = uhCarbarn;
	}

	@Column(name = "uh_attribute", nullable = false, length = 30)
	public String getUhAttribute() {
		return this.uhAttribute;
	}

	public void setUhAttribute(String uhAttribute) {
		this.uhAttribute = uhAttribute;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "uh_year", length = 10)
	public Date getUhYear() {
		return this.uhYear;
	}

	public void setUhYear(Date uhYear) {
		this.uhYear = uhYear;
	}

	@Column(name = "uh_glebeCharacter", length = 50)
	public String getUhGlebeCharacter() {
		return this.uhGlebeCharacter;
	}

	public void setUhGlebeCharacter(String uhGlebeCharacter) {
		this.uhGlebeCharacter = uhGlebeCharacter;
	}

	@Column(name = "uh_countFloor", nullable = false, length = 10)
	public String getUhCountFloor() {
		return this.uhCountFloor;
	}

	public void setUhCountFloor(String uhCountFloor) {
		this.uhCountFloor = uhCountFloor;
	}

	@Column(name = "uh_facility", length = 100)
	public String getUhFacility() {
		return this.uhFacility;
	}

	public void setUhFacility(String uhFacility) {
		this.uhFacility = uhFacility;
	}

	@Column(name = "uh_content", length = 150)
	public String getUhContent() {
		return this.uhContent;
	}

	public void setUhContent(String uhContent) {
		this.uhContent = uhContent;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "uh_issueTime", nullable = false, length = 10)
	public Date getUhIssueTime() {
		return this.uhIssueTime;
	}

	public void setUhIssueTime(Date uhIssueTime) {
		this.uhIssueTime = uhIssueTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "uh_renewalTime", nullable = false, length = 10)
	public Date getUhRenewalTime() {
		return this.uhRenewalTime;
	}

	public void setUhRenewalTime(Date uhRenewalTime) {
		this.uhRenewalTime = uhRenewalTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "uh_availabilityTime", length = 10)
	public Date getUhAvailabilityTime() {
		return this.uhAvailabilityTime;
	}

	public void setUhAvailabilityTime(Date uhAvailabilityTime) {
		this.uhAvailabilityTime = uhAvailabilityTime;
	}

	@Column(name = "uh_reading", nullable = false)
	public Integer getUhReading() {
		return this.uhReading;
	}

	public void setUhReading(Integer uhReading) {
		this.uhReading = uhReading;
	}



	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usedhouse")
	public Set<Leaveword> getLeavewords() {
		return this.leavewords;
	}

	public void setLeavewords(Set<Leaveword> leavewords) {
		this.leavewords = leavewords;
	}

}